package com.resou.reader.api.entry;

import android.os.Parcel;
import android.os.Parcelable;

public class BookContentBean implements Parcelable {

    /**
     * sortNo : 1
     * isPay : 0
     * chapterId : 28234439687587020
     * updateStatus : 1
     * price : 0
     * channel : yw
     * chapterName : 第1章 老班长的恳求
     * discount : 0
     * content : +oXptz31VWlVGqfDxHpCqkknQAyVGQVtA=
     * isVip : 0
     */

    private int sortNo;
    private String isPay;
    private String chapterId;
    private int updateStatus;
    private int price;
    private String channel;
    private String chapterName;
    private int discount;
    private String content;
    private String isVip;
    private String zsChapterLink;
    private String zsChapterSuffix;
    private int chargeType;
    private int userEnergy;
    private Integer unshelf;
    private String vipPrice;
    private String isVipUser;
    private String vipBook;
    private String vipDiscount;
    private String userPrice;//节省金额
    private String readType;//阅读类型；
    private String addMoeny; //添加金额
    private long endTime;//倒计时
    private boolean dateShareFlag;

    public int getUserEnergy() {
        return userEnergy;
    }

    public void setUserEnergy(int userEnergy) {
        this.userEnergy = userEnergy;
    }

    public int getChargeType() {
        return chargeType;
    }

    public void setChargeType(int chargeType) {
        this.chargeType = chargeType;
    }

    public String getZsChapterLink() {
        return zsChapterLink;
    }

    public void setZsChapterLink(String zsChapterLink) {
        this.zsChapterLink = zsChapterLink;
    }

    public int getSortNo() {
        return sortNo;
    }

    public void setSortNo(int sortNo) {
        this.sortNo = sortNo;
    }

    public String getIsPay() {
        return isPay;
    }

    public void setIsPay(String isPay) {
        this.isPay = isPay;
    }

    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }

    public int getUpdateStatus() {
        return updateStatus;
    }

    public void setUpdateStatus(int updateStatus) {
        this.updateStatus = updateStatus;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public int getDiscount() {
        return discount;
    }

    public void setDiscount(int discount) {
        this.discount = discount;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getIsVip() {
        return isVip;
    }

    public void setIsVip(String isVip) {
        this.isVip = isVip;
    }

    public String getZsChapterSuffix() {
        return zsChapterSuffix;
    }

    public void setZsChapterSuffix(String zsChapterSuffix) {
        this.zsChapterSuffix = zsChapterSuffix;
    }

    public String getVipPrice() {
        return vipPrice == null ? "0" : vipPrice;
    }

    public void setVipPrice(String vipPrice) {
        this.vipPrice = vipPrice;
    }

    public String getIsVipUser() {
        return isVipUser == null ? "0" : isVipUser;
    }

    public void setIsVipUser(String isVipUser) {
        this.isVipUser = isVipUser;
    }

    public String getVipBook() {
        return vipBook;
    }

    public void setVipBook(String vipBook) {
        this.vipBook = vipBook;
    }

    public String getVipDiscount() {
        return vipDiscount;
    }

    public void setVipDiscount(String vipDiscount) {
        this.vipDiscount = vipDiscount;
    }

    public String getUserPrice() {
        return userPrice == null ? "0" : userPrice;
    }

    public void setUserPrice(String userPrice) {
        this.userPrice = userPrice;
    }

    public String getReadType() {
        return readType;
    }

    public void setReadType(String readType) {
        this.readType = readType;
    }

    public String getAddMoeny() {
        return addMoeny;
    }

    public void setAddMoeny(String addMoeny) {
        this.addMoeny = addMoeny;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public boolean isDateShareFlag() {
        return dateShareFlag;
    }

    public void setDateShareFlag(boolean dateShareFlag) {
        this.dateShareFlag = dateShareFlag;
    }

    public Integer getUnshelf() {
        return unshelf==null?0:unshelf;
    }

    public void setUnshelf(Integer unshelf) {
        this.unshelf = unshelf;
    }

    @Override
    public String toString() {
        return "BookContentBean{" +
                "sortNo=" + sortNo +
                ", isPay='" + isPay + '\'' +
                ", chapterId='" + chapterId + '\'' +
                ", updateStatus=" + updateStatus +
                ", price=" + price +
                ", channel='" + channel + '\'' +
                ", chapterName='" + chapterName + '\'' +
                ", discount=" + discount +
                ", isVip='" + isVip + '\'' +
                ", zsChapterLink='" + zsChapterLink + '\'' +
                ", zsChapterSuffix='" + zsChapterSuffix + '\'' +
                ", chargeType=" + chargeType +
                ", userEnergy=" + userEnergy +
                ", content='" + content + '\'' +
                '}';
    }

    public BookContentBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.sortNo);
        dest.writeString(this.isPay);
        dest.writeString(this.chapterId);
        dest.writeInt(this.updateStatus);
        dest.writeInt(this.price);
        dest.writeString(this.channel);
        dest.writeString(this.chapterName);
        dest.writeInt(this.discount);
        dest.writeString(this.content);
        dest.writeString(this.isVip);
        dest.writeString(this.zsChapterLink);
        dest.writeString(this.zsChapterSuffix);
        dest.writeInt(this.chargeType);
        dest.writeInt(this.userEnergy);
        dest.writeString(this.vipPrice);
        dest.writeString(this.isVipUser);
        dest.writeString(this.vipBook);
        dest.writeString(this.vipDiscount);
        dest.writeString(this.userPrice);
        dest.writeString(this.readType);
        dest.writeString("0");
        dest.writeLong(this.endTime);
        dest.writeInt(this.dateShareFlag ? 1 : 0);


    }

    protected BookContentBean(Parcel in) {
        this.sortNo = in.readInt();
        this.isPay = in.readString();
        this.chapterId = in.readString();
        this.updateStatus = in.readInt();
        this.price = in.readInt();
        this.channel = in.readString();
        this.chapterName = in.readString();
        this.discount = in.readInt();
        this.content = in.readString();
        this.isVip = in.readString();
        this.zsChapterLink = in.readString();
        this.zsChapterSuffix = in.readString();
        this.chargeType = in.readInt();
        this.userEnergy = in.readInt();
        this.vipPrice = in.readString();
        this.vipBook = in.readString();
        this.vipDiscount = in.readString();
        this.isVipUser = in.readString();
        this.userPrice = in.readString();
        this.readType = in.readString();
        this.addMoeny = in.readString();
        this.endTime = in.readLong();
        this.dateShareFlag = in.readInt() == 1 ? true : false;
    }

    public static final Creator<BookContentBean> CREATOR = new Creator<BookContentBean>() {
        @Override
        public BookContentBean createFromParcel(Parcel source) {
            return new BookContentBean(source);
        }

        @Override
        public BookContentBean[] newArray(int size) {
            return new BookContentBean[size];
        }
    };
}
